package com.PAT.problem;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: zjz
 * @Date: 2022/02/09/0:21
 * @Description:
 * @Target:
 */
public class 多选题常见计分法 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s1 = in.nextLine();
        String[] s = s1.split(" ");
        int N = Integer.valueOf(s[0]);  // 学生人数
        int M = Integer.valueOf(s[1]); // 多选题个数

        String[] MString = new String[M]; // 多选题分数及答案
        String[] NString = new String[N]; // 学生的答案
        for (int i = 0; i < M; i++) {
            MString[i] = in.nextLine();
        }

        for (int i = 0; i < N; i++) {
            NString[i] = in.nextLine();
        }



    }

    public static void Execute(String[] M,String[] N){

        int[] count = new int[M.length];  // 记录对的次数
        int[] countScore = new int[N.length]; // 记录成绩

        for (int i = 0; i < N.length; i++) {
            int index = 0;
            String[] split = N[i].split("\\) \\(");
            while (index<split.length){
                if (index==0){
                    if ((split[index].substring(1,split[index].length())).equals(M[index].substring(4,M[index].length()))){
                        countScore[i]+=(M[index].charAt(0)-'0');
                        count[index]++;
                    }
                }else if (index== split.length-1){
                    if ((split[index].substring(0,split[index].length()-1)).equals(M[index].substring(4,M[index].length()))){
                        countScore[i]+=(M[index].charAt(0)-'0');
                        count[index]++;
                    }
                }else {
                    if (split[index].equals(M[index].substring(4,M[index].length()))){
                        countScore[i]+=(M[index].charAt(0)-'0');
                        count[index]++;
                    }
                }


                index++;
            }
    }
    }
}
